package com.ycwl.freetv.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import android.util.Log;

import com.ycwl.freetv.AdActivity;

/**
 * Created On: 2024/1/23 20:50 <br>
 * Desc      : 开机广播
 *
 * @author wyl
 */
public class
BootReceiver extends BroadcastReceiver {

    private static final String TAG = "BootReceiver";
    private static int reCount = 0;
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent toIntent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
        assert toIntent != null;
        toIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(toIntent);
    }
}
